﻿// Decompiled with JetBrains decompiler
// Type: MCM.Implementation.Global.BaseGlobalSettingsContainer
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using BUTR.DependencyInjection;
using MCM.Abstractions;
using MCM.Abstractions.Base.Global;
using MCM.Abstractions.GameFeatures;
using MCM.Abstractions.Global;

#nullable enable
namespace MCM.Implementation.Global
{
  internal abstract class BaseGlobalSettingsContainer : 
    BaseSettingsContainer<GlobalSettings>,
    IGlobalSettingsContainer,
    ISettingsContainer,
    ISettingsContainerHasSettingsDefinitions,
    ISettingsContainerCanOverride,
    ISettingsContainerCanReset,
    ISettingsContainerPresets,
    ISettingsContainerHasSettingsPack
  {
    protected override GameDirectory RootFolder { get; }

    protected BaseGlobalSettingsContainer()
    {
      GameDirectory gameDirectory = GenericServiceProvider.GetService<IFileSystemProvider>()?.GetDirectory(base.RootFolder, "Global");
      if ((object) gameDirectory == null)
        gameDirectory = base.RootFolder;
      this.RootFolder = gameDirectory;
    }
  }
}
